{layout name="define/layout" /}

<body>
    <div class="header">
        <div class="layout fn-clear">
            <div class="user-logo">
                <a href="javascript:;"></a>
            </div>
            <div class="user-n"><span>个人中心</span></div>
            <ul class="nav">
                <li class="nav-item"><a class="nav-link" href="javascript:MAC.GoBack()">返回</a></li>
                <li class="nav-item"><a class="nav-link" href="/">返回首页</a></li>
                <li class="nav-item"><a class="nav-link">{$info['user_name']}</a></li>
                <li class="nav-item"><a class="nav-link" href="/user/logout.html">退出</a></li>
            </ul>
        </div>
    </div>
    <!-- // i-header end -->


    <!-- 会员中心 -->
    <div id="member" class="fn-clear">
        <div id="left">
            <div class="m-nav">
                <a href="javascript:MAC.GoBack()" class="btn-left"><i class="iconfont ico-right">&#xe625;</i></a>
                <a href="/" class="btn-right"><i class="iconfont ico-right">&#xe634;</i></a>
                <span class="mb-title">个人中心</span>
            </div>
            <div class="tou">
                <div class="tou-left">
                    <img class="face" src="{$info['user_pic']}" alt="会员头像">
                </div>
                <div class="tou-right">
                    <span class="name-tit">{$info['user_name']}</span>
                </div>
            </div>
            <div class="menber-info">
                <div class="info-box">
                    <p class="m-points">{$info['user_points']}</p>
                    <p class="text-small">我的余额</p>
                </div>
                <div class="info-box"><a href="/user/popedom.html">
                        <a href="/user/popedom.html">
                            {eq name="$info['user_status']" value='0'}
                            <p>普通用户</p>
                            <p class="text-small">永久有效</p>
                            {else}
                            <p>网站会员</p>
                            <p class="text-small">{:date('Y-m-d',$info['user_status_time'])}</p>
                            {/eq}
                        </a>
                </div>
            </div>
            <ul>
                <li><a class="flip" href="javascript:void(0)"><span class="xs1"><i
                                class="iconfont huiyuan ver_none">&#xe661;</i>推荐有礼<i
                                class="iconfont ico-right">&#xe623;</i></span><span class="xs2" style="display:none;"><i
                                class="iconfont huiyuan ver_none">&#xe661;</i>推荐有礼<i
                                class="iconfont ico-right">&#xe63a;</i></span><span class="user-time">推荐好友赚现金</span></a>
                    <div class="panel" style="display:none;">
                        <p class="hui">抱歉，推荐有礼活动暂未开放</p>
                    </div>
                </li>
            </ul>
            <ul>
                <li><a href="/user/info.html"><i class="iconfont yonghu">&#xe62b;</i>我的资料<i
                            class="iconfont ico-right">&#xe623;</i></a></li>
                <li><a href="/user/infoedit.html"><i class="iconfont xiugai">&#xe65e;</i>修改资料<i
                            class="iconfont ico-right">&#xe623;</i></a></li>
            </ul>
            <ul>
                <li><a href="/user/favs.html"><i class="iconfont lishi">&#xe629;</i>我的收藏<i
                            class="iconfont ico-right">&#xe623;</i></a></li>
                <li><a href="/user/plays.html"><i class="iconfont lishi">&#xe624;</i>观看记录<i
                            class="iconfont ico-right">&#xe623;</i></a></li>
                <li><a href="javascript:errorMsg();"><i class="iconfont lishi">&#xe63c;</i>下载记录<i
                            class="iconfont ico-right">&#xe623;</i></a></li>
            </ul>
            <ul>
                <li><a href="javascript:errorMsg();"><i class="iconfont huiyuan">&#xe638;</i>升级会员<i
                            class="iconfont ico-right">&#xe623;</i></a></li>
                <li><a href="javascript:errorMsg();"><i class="iconfont xiazai">&#xe65c;</i>充值中心<i
                            class="iconfont ico-right">&#xe623;</i></a></li>
                <li><a href="javascript:errorMsg();"><i class="iconfont xiazai">&#xe660;</i>充值记录<i
                            class="iconfont ico-right">&#xe623;</i></a></li>
                <li><a href="javascript:errorMsg();"><i class="iconfont xiazai">&#xe65f;</i>我要提现<i
                            class="iconfont ico-right">&#xe623;</i></a></li>
            </ul>
            <ul>
                <li><a href="javascript:errorMsg();"><i class="iconfont congzhi">&#xe662;</i>积分记录<i
                            class="iconfont ico-right">&#xe623;</i></a></li>
                <li><a href="javascript:errorMsg();"><i class="iconfont congzhi">&#xe65d;</i>推荐记录<i
                            class="iconfont ico-right">&#xe623;</i></a></li>
            </ul>
            <ul class="logout-ul">
                <li class="logout-item"><a class="logout-link" href="/user/logout.html">退出账号</a></li>
            </ul>
        </div>
        <div id="right">
            <div class="m-nav">
                <a href="javascript:MAC.GoBack()" class="btn-left"><i class="iconfont ico-right">&#xe625;</i></a>
                <a href="javascript:;" id="btnClear" class="btn-right">清空</a>
                <span class="mb-title">我的收藏</span>
            </div>
            <div class="co-right co-right-bg">
                <h2>我的收藏</h2>
                <div class="gong">
                    <a href="javascript:;" onClick="MAC.CheckBox.All('ids[]');">全选</a>
                    <a href="javascript:;" onClick="MAC.CheckBox.Other('ids[]');">反选</a>
                    <a href="javascript:;" id="btnDel">删除</a>
                    <a href="javascript:;" id="btnClear2">清空</a>
                </div>
                <ul class="data__list clearfix">
                    {volist name="data" id="vod"}
                    <li class="data__item">
                        <div class="xz-box">
                            <input name="ids[]" type="checkbox" value="{$vod.id}">
                        </div>
                        <div class="data__img">
                            <a class="data__thumb lazyload" href="{$vod.url}" title="{$vod.title}"
                                data-original="{$vod.pic}" style="display: block; background-image: url({$vod.pic});">
                            </a>
                        </div>
                        <div class="data__txt">
                            <h4 class="data__title">
                                <a href="{$vod.url}" title="{$vod.title}">{$vod.title}</a>
                            </h4>
                            <p>类型：未知</p>
                            <p>观看：{$vod.count}次</p>
                            <p>时间：{$vod.time}</p>
                        </div>
                        <div class="data__del clearfix">
                            <a class="btn-brand btn-del" href="javascript:void(0)" onclick="delData('{$vod.id}')">删除</a>
                        </div>
                    </li>
                    {/volist}
                </ul>
                <div class="member-page">
                </div>
            </div>
        </div>
    </div>
    <script>
        function delData(ids, all) {
            var msg = '删除';
            if (all == 1) {
                msg = '清空';
            }
            if (confirm('确定要' + msg + '记录吗')) {
                $.post("/v1/user/action/system/putSeeRecord", { id: ids, all: all }, function (info) {
                    if (info.code == '200') {
                        layer.msg(msg + "成功", { time: 1500 }, function () {
                            location.reload();
                        });
                    } else {
                        layer.msg(msg + "成功", { time: 1500 }, function () {
                            location.reload();
                        });
                    }
                }, 'json')
            }
        }
        $("#btnClear,#btnClear2").click(function () {
            delData('', 1);
        });
        $("#btnDel").click(function () {
            var ids = MAC.CheckBox.Ids('ids[]');
            if (ids == '') {
                alert("请至少选择一个数据");
                return;
            }
            delData(ids, 0);
        });
    </script>